using UnityEngine;

public class PropertyBlockColorChanger : MonoBehaviour
{
	public Color color;

	private void Start()
	{
		SetColor(color);
	}

	public void SetColor(Color c)
	{
		MaterialPropertyBlock materialPropertyBlock = new MaterialPropertyBlock();
		Renderer component = GetComponent<Renderer>();
		component.GetPropertyBlock(materialPropertyBlock);
		materialPropertyBlock.SetColor("_Color", c);
		component.SetPropertyBlock(materialPropertyBlock);
	}
}
